import java.util.Scanner;

public class demo1 {
    public static void main(String[] args) {
        int[] array = {54,34,76,34,2,1};
        int temp=0;
        for (int i = 0; i <array.length ; i++) {
            for (int j = 0; j <array.length-i-1 ; j++) {
                if(array[j+1]<array[j]){
                    temp=array[j+1];
                    array[j+1]=array[j];
                    array[j]=temp;
                }
            }
        }
        for (int i = 0; i <array.length ; i++) {
            System.out.println(array[i]);
        }
    }
}
